/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ChatSystem;

import ChatController.ChatController;
import Model.User;
import chatGUI.ChatWindowFrame;
import chatGUI.ConnectWindowPanel;
import java.awt.Dimension;
import java.net.SocketException;
import javax.swing.ImageIcon;
import javax.swing.JFrame;

/**
 *
 * @author doutre
 */
public class ChatSystem {

    private ChatController cc;
    private ChatWindowFrame chatWindowFrame;
    private ConnectWindowPanel cwp;

    public ChatSystem() throws SocketException {
        this.cc = new ChatController(this);
        chatWindowFrame = new ChatWindowFrame();
        chatWindowFrame.setTitle("Chat System V1.0");
        chatWindowFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        cwp = new ConnectWindowPanel(this.cc);
        chatWindowFrame.getContentPane().add(cwp);
        chatWindowFrame.setSize(new Dimension(720, 680));
        chatWindowFrame.setResizable(false);
        chatWindowFrame.setIconImage(new ImageIcon("Library/Gajim_logo.png").getImage());
        chatWindowFrame.setLocationRelativeTo(null);

        chatWindowFrame.setVisible(true);

    }

    public ChatController getCc() {
        return cc;
    }

    public ConnectWindowPanel getCwp() {
        return cwp;
    }

    public static void main(String[] args) throws SocketException {
        ChatSystem cs = new ChatSystem();




    }
}
